package com.rainbow.bam.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 *  静态资源访问配置类
 * 
 * @author HarrisonHan
 * @version $Id: WebMvcConfig.java, v 0.1 2015年10月23日 下午4:13:31 HarrisonHan Exp $
 */
@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport {
    
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/css/**").addResourceLocations("classpath:/static/css/");
        registry.addResourceHandler("/js/**").addResourceLocations("classpath:/static/js/");
        registry.addResourceHandler("/img/**").addResourceLocations("classpath:/static/img/");
        registry.addResourceHandler("/fonts/**").addResourceLocations("classpath:/static/fonts/");
    }
}
